package com.sss.demo.util;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;

/**
 * 获取Spring 上下文
 * @author zhaoqiang
 * @company Spring Airlines,Spring Tour
 *
 */
public class ApplicationContextHolder {
	
	private ApplicationContextHolder(){
		
	}
	private static ApplicationContext applicationContext;


	public void setApplicationContext(ApplicationContext applicationContext)  
            throws BeansException {  
            this.applicationContext = applicationContext;  
    }  
  
      
    public static  ApplicationContext  getApplicationContext(){
        return applicationContext;  
    }
}
